package com.xiaolin.oa.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.xiaolin.oa.model.dto.HandleProcessDto;
import com.xiaolin.oa.model.dto.ProcessNodeDetail;
import com.xiaolin.oa.model.dto.StartProcessDto;
import com.xiaolin.oa.model.dto.SysUserView;
import com.xiaolin.oa.model.entity.CommonProcess;

import java.util.List;

/**
 * <p>
 * 审批流程表 服务类
 * </p>
 *
 * @author xiaolin
 * @since 2024-08-22
 */
public interface CommonProcessService extends IService<CommonProcess> {
    List<CommonProcess> getProcessList(CommonProcess process);

    PageInfo<CommonProcess> getProcessPage(Integer page, Integer pageSize, CommonProcess process);

    void checkUnique(CommonProcess process);

    boolean addProcess(CommonProcess process);

    CommonProcess getProcess(Integer id);

    boolean updateProcess(CommonProcess process);

    boolean status(Integer id, String status);

    boolean configOrgForProcess(Integer processId, List<Integer> orgIds);

    List<Integer> getBoundOrgs(Integer processId);

    List<SysUserView> getExecutorOrgUserList(Integer processId);

    ProcessNodeDetail getFirstProcessNode(String processCode);

    ProcessNodeDetail getNextProcessNode(String serialNumber, Integer processFlowId);

    void startProcess(StartProcessDto startProcessDto);

    String handleProcess(HandleProcessDto handleProcessDto);
}
